package com.ccc.demoboot.controller;


import com.ccc.demoboot.common.R;
import com.ccc.demoboot.service.MenuService;
import com.github.pagehelper.PageHelper;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author wz
 * @Date 2024/5/16 9:13
 * @PackageName:com.ccc.demoboot.controller
 * @ClassName: TestController
 */
@CrossOrigin(origins = "*")
@RequestMapping("/test")
@RestController
public class TestController extends CommonController<MenuService> {


    @GetMapping("/get100")
    public String test100(HttpServletRequest request){
        return request.getLocalAddr()+"==="+request.getRemoteAddr().toString()+"==="+request.getRequestURI()+"==="+request.getLocalName();
    }

    @GetMapping("/fa")
    public String fa() {
        return new R().add("a","dududu").getMessage();
    }

}
